package com.kygeng.datamock.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kygeng.common.model.CompanyDetail;
import com.kygeng.common.model.CompanyFullId;
import com.kygeng.common.model.database.CompanyInfo;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CompanyInfoMapper extends BaseMapper<CompanyInfo> {


    /**
     * 根据公司ID查询公司的详细信息
     *
     * @param companyCodes
     * @return
     */
    List<CompanyDetail> selectCompanyDetail(List<String> companyCodes);

    /**
     * 查询公司编号
     *
     * @param idStart
     * @param size
     * @return
     */
    @Select("select id,company_code from company_info where id > #{idStart} limit #{size}")
    List<CompanyFullId> selectCompanyCodePage(@Param("idStart") Integer idStart, @Param("size") Integer size);

}